package com.naja.event.tracking.extract.repository.mybatis;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.clickhouse.client.internal.google.gson.JsonElement;
import com.naja.event.tracking.extract.domain.TBizEvent;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

/**
 * 埋点业务事件(TBizEvent)表数据库访问层
 *
 * @author EasyCode
 * @since 2023-09-18 13:52:47
 */
@DS("clickhouse_1")
public interface TBizEventDao extends BaseMapper<TBizEvent> {

    @Insert("INSERT INTO t_biz_event  format JSONEachRow #{jsonEachRow}")
    Integer insertBatchJson(@Param("jsonEachRow") JsonElement jsonEachRow);
}

